const baseUrl = 'http://shop.bufantec.com/bufan';

const request = ({ url, data, method="GET" }) => {
	return new Promise((resolve, rejected) => {
		uni.request({
			url: `${baseUrl}/${url}`,
			data,
			method,
			header: {
				'content-type': 'application/json; charset=utf-8' // 默认值
			},
			success(res) {
				resolve(res.data)
			}
		});
		
	});
}

export default request;
